/*
 * Copyright 2008-2023 dexian.vip. All rights reserved.
 * Support: http://www.dexian.vip
 * License: http://www.dexian.vip/license
 */

package vip.dexian.core.base.bean;

import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.Comment;

import java.io.Serial;
import java.io.Serializable;

/**
 * 日志父类
 *
 * @author 挺好的 2023年06月07日 10:39
 */
@MappedSuperclass
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public abstract class BaseLogEntity<ID extends Serializable> extends BaseEntity <ID> {

    @Serial
    private static final long serialVersionUID = 1607699206246740141L;

    /**
     * 操作IP
     */
    @Comment ("IP")
    @Column
    private Long ip;

    /**
     * 浏览器 = 浏览器的厂商 + 浏览器的名称
     */
    @Comment ("浏览器")
    @Column (length = 100)
    private String browser;

    /**
     * 浏览器版本
     */
    @Comment ("浏览器版本")
    @Column (length = 50)
    private String browserVersion;

    /**
     * 操作系统名称
     */
    @Comment ("操作系统")
    @Column (length = 50)
    private String osName;

    /**
     * 设备类型
     */
    @Comment ("设备类型")
    @Column (length = 100)
    private String deviceType;
}
